feat(web): relay --auth-file with robot keys, viewer tokens, and the … - #3953
Merged
Merged
Conversation
paul-nechifor
requested review from
Dreamsorcerer,
aclauer,
leshy,
mustafab0 and
spomichter
as code owners
September 5, 2026 23:09
paul-nechifor
marked this pull request as draft
September 5, 2026 23:09
Contributor
|
Codecov Report❌ Patch coverage is
@@ Coverage Diff @@
## main #3953 +/- ##
========================================
Coverage 78.89% 78.89%
========================================
Files 1468 1469 +1
Lines 138785 138999 +214
Branches 11934 11941 +7
========================================
+ Hits 109496 109670 +174
- Misses 25894 25931 +37
- Partials 3395 3398 +3
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 2 files with indirect coverage changes 🚀 New features to boost your workflow:
|
leshy
force-pushed
the
paul/feat/t12d-relay-auth
branch
from
September 6, 2026 07:59
c332da6 to
0af7149
Compare
paul-nechifor
marked this pull request as ready for review
September 8, 2026 05:53
paul-nechifor
force-pushed
the
paul/feat/t12d-relay-auth
branch
from
September 8, 2026 23:31
0af7149 to
b8d9e06
Compare
paul-nechifor
force-pushed
the
paul/feat/t12d-relay-auth
branch
from
September 9, 2026 00:28
b8d9e06 to
b473fe6
Compare
paul-nechifor
force-pushed
the
paul/feat/t12d-relay-auth
branch
from
September 9, 2026 02:34
b473fe6 to
ad3ba7b
Compare
paul-nechifor
force-pushed
the
paul/feat/t12d-relay-auth
branch
from
September 9, 2026 22:54
ad3ba7b to
6b9642a
Compare
paul-nechifor
force-pushed
the
paul/feat/t12d-relay-auth
branch
from
September 10, 2026 00:47
6b9642a to
97a6a7a
Compare
paul-nechifor
marked this pull request as draft
September 10, 2026 01:08
paul-nechifor
force-pushed
the
paul/feat/t12d-relay-auth
branch
from
September 10, 2026 20:00
97a6a7a to
b7f9915
Compare
paul-nechifor
temporarily deployed
to
cachix
September 10, 2026 20:00 — with
GitHub Actions
Inactive
paul-nechifor
force-pushed
the
paul/feat/t12d-relay-auth
branch
from
September 11, 2026 05:20
b7f9915 to
dda5ffb
Compare
leshy
force-pushed
the
paul/feat/t12d-relay-auth
branch
from
September 11, 2026 10:55
dda5ffb to
b33169b
Compare
paul-nechifor
force-pushed
the
paul/feat/t12d-relay-auth
branch
from
September 11, 2026 18:14
b33169b to
296b454
Compare
paul-nechifor
marked this pull request as ready for review
September 11, 2026 19:15
paul-nechifor
force-pushed
the
paul/feat/t12d-relay-auth
branch
from
September 11, 2026 21:44
296b454 to
77f387a
Compare
…cockpit login
A relay that can be exposed: `--auth-file auth.json` maps robot ids to keys
and viewer names to tokens (static secrets, >= 16 chars, no secret twice,
constant-time compares, never logged). Robots and viewers present them in
the hello (`hello.token`, optional, <= 256 chars, no version bump); the
relay answers `auth_failed`, which is terminal on both clients. `/api/stats`
needs `Authorization: Bearer <viewer token>` and drops its CORS header once
auth is on. A non-loopback host binds with cert + key + auth together (or
`--unsafe-non-loopback` as before) and refuses `--serve-dir` there.
Bridge: `GlobalConfig.relay_key` (`RELAY_KEY`, mirrored on
`RelayBridgeConfig`, external relay only) rides `RelayClient.hello(token=)`;
an over-long token is refused before pydantic can quote it. `dimos
show-config` masks `relay_key` and `dimos_api_key`. `RelayProcess(auth_file=)`
joins the relay's read scope.
SDK: `connect({token})`, `TransportPhase.failed.code`. Cockpit: the token
form on `auth_failed` (stored in localStorage, page reload), "log out" in
the status bar.
Tests: deno auth/session/server (hello cases, stats bearer, mode gate),
fixtures with a token hello, pytest mirror + e2e + CLI masking, vitest
SDK/cockpit, and a Playwright login flow (added to the CI list).
paul-nechifor
force-pushed
the
paul/feat/t12d-relay-auth
branch
from
September 14, 2026 16:02
77f387a to
afcdd16
Compare
leshy
approved these changes
Sep 14, 2026
Contributor
|
Backport failed for Please cherry-pick the changes locally and resolve any conflicts. git fetch origin release/0.0.14
git worktree add -d .worktree/backport/3953-to-release/0.0.14 origin/release/0.0.14
cd .worktree/backport/3953-to-release/0.0.14
git switch --create backport/3953-to-release/0.0.14
git cherry-pick -x 7a6f56b7013f5821ca0dcf74ceefc1e1f6aeebec |
paul-nechifor
added a commit
that referenced
this pull request
Sep 14, 2026
#3953 added an --auth-file assertion with a literal /etc/relay path, which fails on macOS for the same reason as the cert/key ones.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
--auth-file. Robots connect with keys tied to their IDs, and viewers connect with access tokens.